Developer Documentation

QuickTime 4 API Documentation

QuickTime Movie File Format Specification, May 1996

| Previous | Chapter contents | Chapter top | Next |

Finding a Key Frame

Finding a key frame for a specified time in a movie is slightly more complicated than finding a sample for a specified time. The media handler must use the sync sample atom and the time-to-sample atom together in order to find a key frame. The media handler does the following:

  1. Examines the time-to-sample atom to determine the sample number that contains the data for the specified time.
  2. Scans the sync sample atom to find the key frame that precedes the sample number chosen in step 1.
  3. Scans the sample-to-chunk atom to discover which chunk contains the key frame.
  4. Extracts the offset to the chunk from the chunk offset atom.
  5. Finds the offset within the chunk and the sample's size by using the sample size atom.

© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Next |